import request from '@/utils/request.js'
export function login(data) {
    return request({
        url: '/admin/login',
        method: 'post',
        data: data
    })
}
export function queryAdmin(data) {
    return request({
        url: '/admin/query',
        method: 'get',
        params: data
    })
}
export function getInfo(token) {
    return request({
        url: '/admin/info',
        method: 'get',
        params: { token }
    })
}
export function logout() {
    return request({
        url: '/admin/logout',
        method: 'post'
    })
}
export function delAdmin(id) {
    return request({
        url: '/admin/'+id,
        method: 'delete'
    })
}
export function editAdmin(data) {
    return request({
        url: '/admin/edit',
        method: 'put',
        data:data
    })
}
export function addAdmin(data) {
    return request({
        url: '/admin/register',
        method: 'post',
        data:data
    })
}
export function selAdmin(data) {
    return request({
        url: '/admin/'+data,
        method: 'get',
    })
}
export function sendMsg(data) {
    return request({
        url: '/admin/sendsms/'+data,
        method: 'post',
    })
}